#include <iostream>
#include <list>
#include "Random.h"
#include "GuiEngine.h"
using namespace std;

void testRandom()
{
	CRandom rGen;
	list<unsigned int> numList;

	cout << "List max size: " << numList.max_size() << endl;

	rGen.SetMin(1);
	rGen.SetMax(200);

	
	for (int i=0; i<230; i++)
	{
		unsigned int tmp = rGen.Next();
		numList.push_back(tmp);
		cout << tmp << " ";
	}
	cout << endl << endl << "Sorted:\n";
	numList.sort();

	for (list<unsigned int>::iterator it = numList.begin(); it != numList.end(); it++)
	{
		cout << *it << " ";
	}
}

void testRepetitionRandom()
{
	CRandom rGen;
	list<unsigned int> numList;

	cout << "testRepetitionRandom()" << endl;

	rGen.SetRepetition(1);
	rGen.SetMin(50);
	rGen.SetMax(200);

	cout << "Remaining numbers: " << rGen.RemainingNumbers() << endl;
	
	for (int i=0; i<230; i++)
	{
		unsigned int tmp = rGen.Next();
		numList.push_back(tmp);
		cout << tmp << " ";
	}

	cout << "Remaining numbers: " << rGen.RemainingNumbers() << endl;

	cout << endl << endl << "Sorted:\n";
	numList.sort();

	for (list<unsigned int>::iterator it = numList.begin(); it != numList.end(); it++)
	{
		cout << *it << " ";
	}
}


int main(void)
{
	//testRandom();
	//testRepetitionRandom();

	CGuiEngine guiEngine;
	guiEngine.Setup();
	guiEngine.Run();
	guiEngine.TearDown();

	return 0;
}